home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / ivbsrc / freemem.frm < prev    next >
Text File  |  1995-05-08  |  1KB  |  47 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Get Free Memory"
  4.    ClientHeight    =   1230
  5.    ClientLeft      =   1335
  6.    ClientTop       =   1980
  7.    ClientWidth     =   3180
  8.    Height          =   1635
  9.    Left            =   1275
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   1230
  13.    ScaleWidth      =   3180
  14.    Top             =   1635
  15.    Width           =   3300
  16.    Begin CommandButton Command1 
  17.       Caption         =   "Get amount of Free Memory"
  18.       Height          =   375
  19.       Left            =   120
  20.       TabIndex        =   2
  21.       Top             =   720
  22.       Width           =   2775
  23.    End
  24.    Begin TextBox Text1 
  25.       Height          =   375
  26.       Left            =   1320
  27.       TabIndex        =   1
  28.       Top             =   120
  29.       Width           =   1575
  30.    End
  31.    Begin Label Label1 
  32.       Caption         =   "Free memory"
  33.       Height          =   255
  34.       Left            =   120
  35.       TabIndex        =   0
  36.       Top             =   240
  37.       Width           =   1215
  38.    End
  39. End
  40. Declare Function GetFreeSpace Lib "Kernel" (ByVal wFlags As Integer) As Long
  41.  
  42. Sub Command1_Click ()
  43.   Memory& = GetFreeSpace(0)
  44.   Text1.Text = Format$(Memory&, "##,###,###") + " bytes"
  45. End Sub
  46.  
  47.